{include_core file="m/lib/header.html" title="选择服务类型" center="center"}
<div class="sale">
  <div class="sale-list js_sltService" data-order_id="{$order_id}">
    <div class="repair-list clearfix" data-type="1">
      <p>申请退货</p>
      <a class="repair-arrow" href="javascript:void(0);"></a>
    </div>
    {*
    <div class="repair-list clearfix" data-type="2">
      <p>申请换货</p>
      <a class="repair-arrow" href="javascript:void(0);"></a>
    </div>
    *}
    <div class="repair-list clearfix" data-type="3">
      <p>申请维修</p>
      <a class="repair-arrow" href="javascript:void(0);"></a>
    </div>
  </div>
</div>
<script>
  $(function(){
    $('.js_sltService>div').on('click', function(){
      var type = $(this).data('type');
      var orderId = $(this).closest('.js_sltService').data('order_id');
      var url  = siteUrl+'/service/check_service_time';
      if (btnClick() === false) {
        return false;
      }
      $.post(url, { type:type, order_id:orderId }, function(json){
        if (json.info == 'ok') {
          location.href = siteUrl+'/service?order_id='+orderId+'&type='+type;
        } else {
          showMsg(json.info);
          btnClick('reset');
        }
      }, 'json');
    });
  });
</script>
{include_core file="m/lib/footer.html" center="center"}